package leetcode.code034;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution034 implements IDebug {

	abstract public int[] searchRange(int[] nums, int target);

	private void debug(String input, int target, String expect) {
		int[] param1 = HelpDebug.str2array3(input);
		int[] result = this.searchRange(param1, target);
		HelpDebug.printInputs(HelpDebug.str2array3(expect), new Object[] { param1 });
		HelpDebug.printObject(result);
		HelpDebug.compare(HelpDebug.str2array3(expect), result);
	}

	@Override
	public void debug1() {
		String input = "[5,7,7,8,8,10]";
		int target = 8;
		String expect = "[3,4]";
		this.debug(input, target, expect);
	}

	@Override
	public void debug2() {
		String input = "[5,7,7,8,8,10]";
		int target = 6;
		String expect = "[-1,-1]";
		this.debug(input, target, expect);
	}

	@Override
	public void debug3() {
		String input = "[]";
		int target = 0;
		String expect = "[-1,-1]";
		this.debug(input, target, expect);
	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
